package com.northwind.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@NoArgsConstructor
@AllArgsConstructor
@Data
@Table(name = "nwg_log")
public class Log {


    @Excel(name = "ID")
    @Id
    private String id;

    @Excel(name = "管理员名字")
    @Column(name = "admin_name")
    private String adminName;

    @Excel(name = "操作时间",format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "option_time")
    /*设置springMVC接收日期的格式 默认yyyy/MM/dd*/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    /*设置响应json日期类型格式*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date optionTime;

    @Excel(name = "操作方法")
    private String method;

    @Excel(name = "操作状态")
    private String status;

}